package cn.kgc.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author: fighting
 * @date: 2022/2/4
 * @description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @TableId(type = IdType.AUTO)//让主键自增   前提：数据库主键必须自增
    private Long id;
    private String name;
    private Integer age;
    private String email;
    //字段=》Field
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    @Version//乐观锁version注解
    private Integer version;

    @TableLogic
    private Integer deleted;



}
